﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CL
{

    public interface ICLDestroy
    {
    }

    public interface ICLDestroySystem : ICLSystemType
    {
        void Run(CLEntity o);
    }
	public abstract class CLDestroySystem<T> : CLSystemObject, ICLDestroySystem where T : CLEntity, ICLDestroy
	{
        public int GetInstanceQueueIndex()
        {
            return CLInstanceQueueIndex.None;
        }

        public void Run(CLEntity o)
        {
            this.Destroy((T)o);
        }

        public Type SystemType()
        {
            return typeof(ICLDestroySystem);
        }

        public Type Type()
        {
            return typeof(T);
        }

        protected abstract void Destroy(T self);
	}
}
